package com.bwie.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.bwie.poi.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 商品表
 *
 * @TableName t_prod
 */
@TableName(value = "t_prod")
@Data
public class Prod implements Serializable {
    /**
     * 商品ID
     */
    @TableId(type = IdType.AUTO)
    @Excel(name = "商品ID")
    private Integer prodId;

    /**
     * 商品名称
     */
    @Excel(name = "商品名称")
    private String prodName;

    /**
     * 商品类型
     */
    @Excel(name = "商品类型", readConverterExp = "1=手机,2=手表,3=汽车,4=电脑")
    private Integer prodType;

    /**
     * 商品价格
     */
    @Excel(name = "商品价格")
    private BigDecimal prodPrice;

    /**
     * 库存
     */
    @Excel(name = "库存")
    private Integer prodStock;

    /**
     * 商品状态：0草稿1待审核2上线3驳回4下线
     */
    @Excel(name = "商品状态", readConverterExp = "0=草稿,1=待审核,2=上线,3=驳回,4=下线")
    private Integer prodStatus;

    /**
     * 录入时间
     */
    @Excel(name = "录入时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8", shape = JsonFormat.Shape.STRING)
    private Date createTime;


    /**
     * 商家ID
     */
    private Integer userId;

    /**
     * 驳回原因
     */
    private String reason;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}